-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Support for custom marker symbols #7653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: gatopeich <7722268+gatopeich@users.noreply.github.com>
Co-authored-by: gatopeich <7722268+gatopeich@users.noreply.github.com>
Co-authored-by: gatopeich <7722268+gatopeich@users.noreply.github.com>
Co-authored-by: gatopeich <7722268+gatopeich@users.noreply.github.com>
Co-authored-by: gatopeich <7722268+gatopeich@users.noreply.github.com>
…calculation Co-authored-by: gatopeich <7722268+gatopeich@users.noreply.github.com>
Co-authored-by: gatopeich <7722268+gatopeich@users.noreply.github.com>
Allow custom SVG marker functions directly as marker.symbol values
|
Hello @gatopeich! Before we review this PR, could you please help us understand what use case prompted this change? Ideally, you'd create an issue describing the problem and explaining why it should be fixed. |
|
I've used this professionally over the last few years to plot meaningful icons on top of maps, e.g. pedestrians, cars, directional wind arrows based on data... |
|
Let me add some nice example. |
|
Sounds good. While you're at it, could you double check the test you added? It's failing in CI. |
This pull request introduces support for custom markers via functions in Plotly.js scatter plots, allowing users to pass a function directly as the
marker.symbolproperty to define custom SVG marker shapes. The implementation includes updates to the drawing logic, comprehensive documentation, a demo HTML file, and new tests to ensure correct behavior. This feature provides a flexible and user-friendly way to extend marker capabilities beyond the built-in set.Custom Marker Function Support:
marker.symbolin scatter plots, enabling users to define custom SVG path markers directly without registration. The drawing logic is updated to handle both functions and traditional symbol identifiers throughout the rendering pipeline. [1] [2] [3] [4]Documentation and Examples:
CUSTOM_MARKER_FUNCTIONS.mdfile with detailed documentation, usage examples, function signatures, SVG path command explanations, and best practices for custom marker functions.devtools/custom_marker_demo.html) showcasing how to use custom marker functions in practice, with live examples and code snippets.Testing: